/*
========================================================================
 Name        : ExportContactsExportingContainer.h
 Author      : 
 Copyright   : Your copyright notice
 Description : 
========================================================================
*/
#ifndef EXPORTCONTACTSEXPORTINGCONTAINER_H
#define EXPORTCONTACTSEXPORTINGCONTAINER_H

 
#include <coecntrl.h>		
 
class MEikCommandObserver;		
class CEikLabel;
class CEikRichTextEditor; 
class TCharFormatMask;
class CCharFormatLayer;
class CParaFormatLayer;
class CParaFormat;
class CRichText;
class CAknsBasicBackgroundControlContext;
 
class CExportContactsExportingContainer : public CCoeControl
{
public: 
	enum TControls
	{		 		 
		EExportingProcessTitleLabel,
		EMessageNoteRichText,	
		ELastControl 
	};
	
public:	 
	CExportContactsExportingContainer();
	static CExportContactsExportingContainer* NewL( 
													const TRect& aRect, 
													const CCoeControl* aParent, 
													MEikCommandObserver* aCommandObserver );
	static CExportContactsExportingContainer* NewLC( 
													const TRect& aRect, 
													const CCoeControl* aParent, 
													MEikCommandObserver* aCommandObserver );
	void ConstructL( 
					const TRect& aRect, 
					const CCoeControl* aParent, 
					MEikCommandObserver* aCommandObserver );
	virtual ~CExportContactsExportingContainer();

public: 
	TInt CountComponentControls() const;
	CCoeControl* ComponentControl( TInt aIndex ) const;
	TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,TEventCode aType );
	void HandleResourceChange( TInt aType );
	TTypeUid::Ptr MopSupplyObject(TTypeUid aId);

public:
	void SetExportFile(const TDesC& aExportFile);
	void ExportingNotify(const TInt aCurrentCount,const TInt aWholeCount);
	void ChangeNotifyText();
	
protected:	 
	void SizeChanged();
	void Draw( const TRect& aRect ) const; 
	
private:
	void InitializeControlsL();
	void LayoutControls();
	void SetMessageNoteRichTextFormattingL();		
 
private: 
//	CEikLabel*           iExportingProcessLabel;
	CEikLabel*           iExportingProcessTitleLabel;
	CEikRichTextEditor*  iMessageNoteRichText; 
	CCharFormatLayer*    iCharform;
	CParaFormatLayer*    iParaform;
	CParaFormat*         iParaFormat;
	CRichText*           iRichMessage;
	CCoeControl*         iFocusControl;
	MEikCommandObserver* iCommandObserver; 
	CAknsBasicBackgroundControlContext* iBgContext;	
	HBufC*  			iExportFile;  
	
	TInt 		iCurrentCount;
	TInt 		iWholeCount;
	TReal       iExportingPercent;
};
#endif

